
#ifndef __TAPI_ACI_CALLBACK_H__
#define __TAPI_ACI_CALLBACK_H__

#include "tapi_aci_cmh.h"
#include "tapi_gaci_cmh.h"

#define NO_ASCIIZ
#define SMS_PDU_SUPPORT
#define SIM_TOOLKIT
// #define MFW
#define TI_PS_FF_EM
#define TI_GPRS
//#define TI_PS_FF_SATE


struct TAPI_RESPONSE_TBL {
    void (*rAT_OK        )( T_ACI_AT_CMD );
    void (*rAT_NO_CARRIER)( T_ACI_AT_CMD    cmdId,
                            SHORT cId );
    void (*rAT_CONNECT   )( T_ACI_AT_CMD    cmdId,
                            T_ACI_BS_SPEED  speed,
                            SHORT cId );
    void (*rAT_BUSY      )( T_ACI_AT_CMD    cmdId,
                            SHORT cId );
    void (*rAT_NO_ANSWER )( T_ACI_AT_CMD    cmdId,
                            SHORT cId );
    void (*rAT_PlusCME   )( T_ACI_AT_CMD    cmdId,
                            T_ACI_CME_ERR   err );
    void (*rAT_PlusCMS   )( T_ACI_AT_CMD    cmdId,
                            T_ACI_CMS_ERR   err,
                            T_EXT_CMS_ERROR * conc_error);
    void (*rAT_PlusCOPS)  ( SHORT           lastIdx,
                            T_ACI_COPS_OPDESC * operLst);
    void (*rAT_PlusCPIN  )( T_ACI_CPIN_RSLT rslt );
    void (*rAT_PlusCREG  )( T_ACI_CREG_STAT status ,
                            USHORT          lac,
                            USHORT          cid );
    void (*rAT_PercentCREG  )( T_ACI_CREG_STAT status ,
                            USHORT          lac,
                            USHORT          cid,
                            U8              gprs_ind,
                            U8              rt);
    void (*rAT_PlusCRING )( T_ACI_CRING_MOD mode,
                            T_ACI_CRING_TYP type1,
                            T_ACI_CRING_TYP type2 );
    void (*rAT_PlusCRING_OFF) ( SHORT cId  );
#ifdef NO_ASCIIZ
    void (*rAT_PlusCLIP  )( T_ACI_CLIP_STAT stat,
                            CHAR            * number,
                            T_ACI_TOA       * type,
                            U8                validity,
                            CHAR            * subaddr,
                            T_ACI_TOS       * satype,
                            T_ACI_PB_TEXT   * alpha);
#else  /* ifdef NO_ASCIIZ */
    void (*rAT_PlusCLIP  )( T_ACI_CLIP_STAT stat,
                            CHAR            * number,
                            T_ACI_TOA       * type,
                            U8                validity,
                            CHAR            * subaddr,
                            T_ACI_TOS       * satype,
                            CHAR            * alpha);
#endif /* ifdef NO_ASCIIZ */

     void (*rAT_PlusCDIP) ( CHAR       * number,
                             T_ACI_TOA  * type,
                             CHAR       * subaddr,
                             T_ACI_TOS  * satype);

    void (*rAT_PlusCLIR  )( T_ACI_CLIR_MOD  mode,
                            T_ACI_CLIR_STAT stat);
#ifdef NO_ASCIIZ
    void (*rAT_PlusCOLP  )( T_ACI_COLP_STAT stat,
                            CHAR          * number,
                            T_ACI_TOA     * type,
                            CHAR          * subaddr,
                            T_ACI_TOS     * satype,
                            T_ACI_PB_TEXT * alpha);
#else  /* ifdef NO_ASCIIZ */
    void (*rAT_PlusCOLP  )( T_ACI_COLP_STAT stat,
                            CHAR          * number,
                            T_ACI_TOA     * type,
                            CHAR          * subaddr,
                            T_ACI_TOS     * satype,
                            CHAR          * alpha);
#endif /* ifdef NO_ASCIIZ */
    void (*rAT_PlusDR    )( T_ACI_DR_TYP    type );
    void (*rAT_PlusCR    )( T_ACI_CR_SERV   service);
    void (*rAT_PlusCLCK  )( T_ACI_CLSSTAT * clsStat);
    void (*rAT_PlusCCFC  )( T_ACI_CCFC_SET* setting);
#ifdef NO_ASCIIZ
    void (*rAT_PlusCCWA  )( T_ACI_CLSSTAT * clsStat,
                            CHAR          * number,
                            T_ACI_TOA     * type,
                            U8              validity,
                            T_ACI_CLASS     class_type,
                            T_ACI_PB_TEXT * alpha);
#else  /* ifdef NO_ASCIIZ */
    void (*rAT_PlusCCWA  )( T_ACI_CLSSTAT * clsStat,
                            CHAR          * number,
                            T_ACI_TOA     * type,
                            U8              validity,
                            T_ACI_CLASS     class_type,
                            CHAR          * alpha);
#endif /* ifdef NO_ASCIIZ */
    void (*rAT_PlusCSMS  )( T_ACI_CSMS_SERV service,
                            T_ACI_CSMS_SUPP mt,
                            T_ACI_CSMS_SUPP mo,
                            T_ACI_CSMS_SUPP bm);
    void (*rAT_PlusCPMS  )( T_ACI_SMS_STOR_OCC * mem1,
                            T_ACI_SMS_STOR_OCC * mem2,
                            T_ACI_SMS_STOR_OCC * mem3);
    void (*rAT_PlusCBMI  )( T_ACI_SMS_STOR  mem,
                            UBYTE           index);
    void (*rAT_PlusCMT   )( T_ACI_CMGL_SM*  sm);
    void (*rAT_PlusCMTPdu )(T_MNSMS_MESSAGE_IND* pTpdu);
    void (*rAT_PlusCMTI  )( T_ACI_SMS_STOR  mem,
                            UBYTE           index,
                            T_ACI_CMGL_SM*  sm);
    void (*rAT_PlusCMGS) ( UBYTE           mr,
                            UBYTE           numSeg);
    void (*rAT_PercentCMGRS  )( T_ACI_CMGRS_MODE  mode,
                                UBYTE             tp_mr,
                                UBYTE             resend_count,
                                UBYTE             max_retrans );
    void (*rAT_PlusCMSS) ( UBYTE           mr,
                            UBYTE           numSeg);
    void (*rAT_PlusCMGW) ( UBYTE           index,
                            UBYTE           numSeg);
    void (*rAT_PlusCMGC) ( UBYTE           mr);
    void (*rAT_PlusCDS   )( T_ACI_CDS_SM*   st);

    void (*rAT_PlusCDSPdu)(T_MNSMS_STATUS_IND * mnsms_status_ind);

    void (*rAT_PlusCBM)  ( SHORT           sn,
                            SHORT           mid,
                            SHORT           dcs,
                            UBYTE           page,
                            UBYTE           pages,
                            T_ACI_CBM_DATA* data);
    void (*rAT_PlusCBMPdu)(T_ACI_CBM_DATA* data);
    void (*rAT_PlusILRR  )( T_ACI_BS_SPEED  speed,
                            T_ACI_BS_FRM    format,
                            T_ACI_BS_PAR    parity);
    void (*rAT_PlusCMGR  )( T_ACI_CMGL_SM*  sm,
                            T_ACI_CMGR_CBM* cbm );
    void (*rAT_PecentCMGRPdu)(T_MNSMS_READ_CNF *mnsms_read_cnf);
    void (*rAT_PlusCMGD) ( void );
    void (*rAT_PlusCMGL  )( T_ACI_CMGL_SM  *smLst);
    void (*rAT_PecentCMGLPdu)(T_MNSMS_READ_CNF *mnsms_read_cnf);
    void (*rAT_PlusCUSD  )( T_ACI_CUSD_MOD   m,
                            T_ACI_USSD_DATA *ussd,
                            SHORT            dcs);
    void (*rAT_PlusCCCM) ( LONG           *ccm);
    void (*rAT_PlusCSSI  )( T_ACI_CSSI_CODE code,
                            SHORT           index);
    void (*rAT_PlusCSSU  )( T_ACI_CSSU_CODE code,
                            SHORT           index,
                            CHAR           *number,
                            T_ACI_TOA      *type,
                            CHAR           *subaddr,
                            T_ACI_TOS      *satype);
    void (*rAT_PercentCCCN )( T_ACI_FAC_DIR tDirection,
                              SHORT         cId,
                              T_NAS_fac_inf     *acFie );
    void (*rAT_PercentCSSN )( T_ACI_FAC_DIR        tDirection,
                              T_ACI_FAC_TRANS_TYPE tType,
                              T_NAS_fac_inf            *acFie );
    void (*rAT_PlusCPOL)  ( SHORT              startIdx,
                            SHORT              lastIdx,
                            T_ACI_CPOL_OPDESC *operLst,
                            SHORT              usdNtry );

    void (*rAT_PlusCLAN  )( T_ACI_LAN_SUP  *CLang);
    void (*rAT_PlusCLAE  )( T_ACI_LAN_SUP  *CLang);

#ifdef TI_UMTS
    void (*rAT_PercentCSQ)  (UBYTE rssi, UBYTE ber, UBYTE actrssilevel, UBYTE rscp, UBYTE actrscplevel );
#else
    void (*rAT_PercentCSQ)  (UBYTE rssi, UBYTE ber, UBYTE actlevel);
#endif

    void (*rAT_PlusCIMI) ( CHAR           *imsi);
    void (*rAT_PlusCNUM  )( T_ACI_CNUM_MSISDN *msisdn,
                            UBYTE              num );
    void (*rAT_PlusCRSM)  ( SHORT           sw1,
                            SHORT           sw2,
                            SHORT           rspLen,
                            UBYTE          *rsp    );
    void (*rAT_PlusCSIM)  ( SHORT           rspLen,
                            UBYTE          *rsp    );
    void (*rAT_PlusCGCMOD)( void );
    void (*rAT_PlusCCWV  )( T_ACI_CCWV_CHRG charging );
    void (*rAT_PercentSQ) ( BYTE            segm);
    void (*rAT_PercentBC) ( BYTE            segm);
    void (*rAT_PercentDRV)( T_ACI_DRV_DEV   device,
                            T_ACI_DRV_FCT   function,
                            UBYTE           val1,
                            UBYTE           val2);
    void (*rAT_PercentSIMREM)( T_ACI_SIMREM_TYPE srType );
    void (*rAT_PercentSIMINS)( T_ACI_CME_ERR     err    );
    void (*rAT_PercentCOLR  )( T_ACI_COLR_STAT stat);
    void (*rAT_PercentCLOG  )( T_ACI_CLOG     *cmd );
    void (*rAT_PercentKSIR  )( T_ACI_KSIR     *ksStat);
    void (*rAT_PercentCPI)  ( SHORT           cId,
                               T_ACI_CPI_MSG   msgType,
                               T_ACI_CPI_IBT   ibt,
                               T_ACI_CPI_TCH   tch,
                               USHORT          cause );
    void (*rAT_PercentCSTAT)(T_ACI_STATE_MSG msgType);
    void (*rAT_PercentCPRSM)(T_ACI_CPRSM_MOD mode);
    void (*rAT_PercentALS  )( T_ACI_ALS_MOD ALSmode );

    void (*rAT_PercentCTYI  )( T_ACI_CTTY_NEG  neg,
                               T_ACI_CTTY_TRX  trx );
    void (*rAT_PercentCTV)   ( void );
#if defined SIM_TOOLKIT || defined (TI_PS_FF_TRANSPARENT_SAT)
    void (*rAT_PercentSATI)  ( SHORT           len,
                               UBYTE          *satCmd);
    void (*rAT_PercentSATE)  ( SHORT           len,
                               UBYTE          *satCmd);
#endif /* SIM_TOOLKIT or TI_PS_FF_TRANSPARENT_SAT */
#ifdef SIM_TOOLKIT
    void (*rAT_PercentSATN)  ( SHORT           len,
                               UBYTE          *satCmd);
#ifdef TI_PS_FF_SATE
    void (*rAT_PercentSATA)  ( SHORT           cId,
                               LONG            rdlTimeout_ms,
                               T_ACI_SATA_ADD *addParm);
    void (*rCI_PercentSATT )( T_ACI_CMD_SRC  srcId,
                                   T_ACI_SATT_CS  cause );
#else
    void (*rAT_PercentSATA)  ( SHORT           cId,
                               LONG            rdlTimeout_ms);
#endif /* TI_PS_FF_SATE */
    void (*rAT_PercentSATT)( T_ACI_CMD_SRC  srcId, T_ACI_SATT_CS  cause );

    void (*rAT_SatFUN) ( int ref, T_SIM_FILE_UPDATE_IND* mmi_insert_ind );
    void (*rAT_SatFRN) ( int ref, T_SIM_FILE_UPDATE_IND* mmi_insert_ind );

#endif  /* SIM_TOOLKIT */
    void (*rAT_PercentCCBS  )( T_ACI_CCBS_IND  indct,
                               T_ACI_CCBS_STAT status,
                               T_ACI_CCBS_SET *setting );
    void (*rAT_PercentCNAP  )( T_callingName *NameId, T_ACI_CNAP_STATUS status );
    void (*rAT_PlusCTZV)     ( S8 time_zone );

    void (*rAT_PercentCTZV  )( T_MMREG_INFO_IND *mmr_info_ind, S8 timezone);
    void (*rAT_PercentCNIV  )( T_MMREG_INFO_IND *mmr_info_ind);

    void (*rAT_SignalSMS)    ( UBYTE state );

    void (*rAT_phb_status   )( T_ACI_PB_STAT status );
    void (*rAT_sms_ready)    ( void );

    void (*rAT_PlusCIEV)( T_ACI_MM_CIND_VAL_TYPE sCindValues, T_ACI_MM_CMER_VAL_TYPE sCmerSettings );
    void (*rAT_PlusCKEV)( T_ACI_CKEV_VALUES sCkevValues, T_ACI_CMER_MODE_TYPE mode);
    void (*rAT_PercentCPKY)(CHAR *keys, SHORT time, SHORT pause);

#ifdef TI_PS_FF_EM
    void (*rAT_PercentEINFO) (U16 offset, U16 length, T_ENG_INFO_REQ *eng_info_req);
    void (*rAT_PercentESINFO) (U16 offset, U16 length, T_ENG_INFO_STATIC_REQ *eng_info_static_req);
#endif /* TI_PS_FF_EM */

    void (*rAT_PercentRDL)(T_ACI_CC_REDIAL_STATE state);
    void (*rAT_PercentRDLB)(T_ACI_CC_RDL_BLACKL_STATE state);

#ifdef FF_GPS
    void (*rAT_PercentGPSN) ( U8 ntfyType, U8 locType, U8 *clientID, U8 * clientName );
    void (*rAT_PercentGPSR)( U8 cause, U8 format, U8 *data );
#endif

    void (*rAT_PercentCPRI)  ( UBYTE gsm_ciph,
                               UBYTE gprs_ciph );

#if defined(TI_UMTS) && defined(TI_PS_3GPP_R5)
    void (*rAT_PercentMMCI )( T_ACI_MMCI_STAT state);
#endif /* TI_UMTS && TI_PS_3GPP_R5 */

    void (*rAT_PercentSIMEF) (T_SIM_FILE_UPDATE_IND *updateInd);

    void (*rAT_PlusCLVL)(U8 volume);
    void (*rAT_PlusCMUT)(U8 volume);
    void (*rAT_PlusCRSL)(U8 volume);

    void (*rAT_PercentCMGR  )( T_ACI_CMGL_SM*  sm,
                               T_ACI_CMGR_CBM* cbm );

    void (*rAT_PercentCMGL  )( T_ACI_CMGL_SM  *smLst);

    void (*rBAT_PlusCMGL)(
        T_MNSMS_READ_CNF *mnsms_read_cnf);

    void (*rBAT_PercentCMGR)(
        T_MNSMS_READ_CNF *mnsms_read_cnf,
        T_ACI_CMGR_CBM *cbm);

#ifdef TI_PS_FF_EM
    void (*rBAT_PercentEINFO) (U16 offset, U16 length, T_ENG_INFO_REQ *eng_info_req);
    void (*rBAT_PercentESINFO) (U16 offset, U16 length, T_ENG_INFO_STATIC_REQ *eng_info_static_req);
#endif /* TI_PS_FF_EM */

    void (*rAT_PlusPACSP) (U8 srcId, U8 cspStat);   /* OMAPS00082147 */

#ifdef TI_PS_3GPP_R5
    void (*rAT_PercentMBI   )( T_BAT_cmd_response *pCmdResp );
    void (*rAT_PercentMBDN  )( T_BAT_cmd_response *pCmdResp );
    void (*rAT_PercentMWIS  )( T_BAT_cmd_response *pCmdResp );
    void (*rAT_PercentCFIS  )( T_BAT_cmd_response *pCmdResp );
    void (*rAT_PercentMWI   )( T_BAT_cmd_response *pCmdResp );
#endif

    void (*rAT_PercentCAUSE) (T_CAUSE_ctrl_value ctrl_value, T_CAUSE_value cause_value);
    void (*rAT_PercentRLOG)(T_ACI_RLOG *rslt);

#ifdef CMH_F_C /*lint -save -e18 */ /* Turn off Lint errors for this "construct" */
     void (*rAT_PlusCGACT)            ( void );
     void (*rAT_PlusCGDATA)           ( void );
     void (*rAT_PlusCGANS)            ( void );
     void (*rAT_PlusCGEREP)           ( void );
     void (*rAT_PlusCGREG)            ( void );
     void (*rAT_changedQOS)           ( void );
     void (*rAT_PercentSNCNT)         ( void );
     void (*rAT_PercentCGREG)         ( void );
     void (*rAT_PlusCGCMOD)           ( void );
    /*lint -restore */
#else
     void (*rAT_PlusCGACT)            ( SHORT link_id );
     void (*rAT_PlusCGDATA)           ( SHORT link_id );
     void (*rAT_PlusCGANS)            ( SHORT link_id );
     void (*rAT_PlusCGEREP)           ( T_CGEREP_EVENT event, T_CGEREP_EVENT_REP_PARAM *param );
     void (*rAT_PlusCGREG)            ( T_CGREG_STAT stat, USHORT lac, USHORT ci );
     void (*rAT_changedQOS)           ( U8 cid, T_PS_qos *qos );
     void (*rAT_PercentSNCNT)         ( UBYTE c_id,
                                           ULONG octets_uplink,
                                           ULONG octets_downlink,
                                           ULONG packets_uplink,
                                           ULONG packets_downlink );
     void (*rAT_PercentCGREG)         ( T_P_CGREG_STAT stat, USHORT lac, USHORT ci, BOOL bActiveContext );
     /* void (*rAT_PlusCGCMOD)           ( void ); redefined!!!*/
#endif
};

#endif /* __TAPI_ACI_CALLBACK_H__ */

